package agent.communication;

/**
 * Liste les messages permettant la communication entre les agents.
 * @author Guillaume Poças
 */
public enum AgentsCommunicationMsg implements AgentsCommandMaker {

	INFORM("INFORM"),
	CFP("CFP"),
	PROPOSE("PROPOSE"),
	ACCEPT_PROPOSAL("ACCEPT_PROPOSAL"),
	REJECT_PROPOSAL("REJECT_PROPOSAL"),
	CONFIRM("CONFIRM");

	public String msg;

	/**
	 * Constructeur.
	 * @param msg
	 */
	private AgentsCommunicationMsg(String msg) {
		this.msg = msg;
	}

	@Override
	public String makeCommand(String... values) {
		StringBuilder sb = new StringBuilder(msg);
		if(values!=null)
			for(String v:values)
				sb.append(" "+v);
		return sb.toString();
	}
}
